home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / mozITXTToHTMLConv.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  190 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM mozITXTToHTMLConv.idl
  3.  */
  4.  
  5. #ifndef __gen_mozITXTToHTMLConv_h__
  6. #define __gen_mozITXTToHTMLConv_h__
  7.  
  8.  
  9. #ifndef __gen_nsIStreamConverter_h__
  10. #include "nsIStreamConverter.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsrootidl_h__
  14. #include "nsrootidl.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. // {77c0e42a-1dd2-11b2-8ebf-edc6606f2f4b}
  22. #define MOZITXTTOHTMLCONV_CID \
  23.     { 0x77c0e42a, 0x1dd2, 0x11b2, \
  24.     { 0x8e, 0xbf, 0xed, 0xc6, 0x60, 0x6f, 0x2f, 0x4b } }
  25.     
  26. #define MOZ_TXTTOHTMLCONV_CONTRACTID \
  27.   "@mozilla.org/txttohtmlconv;1"
  28.  
  29. /* starting interface:    mozITXTToHTMLConv */
  30. #define MOZITXTTOHTMLCONV_IID_STR "77c0e42a-1dd2-11b2-8ebf-edc6606f2f4b"
  31.  
  32. #define MOZITXTTOHTMLCONV_IID \
  33.   {0x77c0e42a, 0x1dd2, 0x11b2, \
  34.     { 0x8e, 0xbf, 0xed, 0xc6, 0x60, 0x6f, 0x2f, 0x4b }}
  35.  
  36. class NS_NO_VTABLE mozITXTToHTMLConv : public nsIStreamConverter {
  37.  public: 
  38.  
  39.   NS_DEFINE_STATIC_IID_ACCESSOR(MOZITXTTOHTMLCONV_IID)
  40.  
  41.   enum { kEntities = 0U };
  42.  
  43.   enum { kURLs = 2U };
  44.  
  45.   enum { kGlyphSubstitution = 4U };
  46.  
  47.   enum { kStructPhrase = 8U };
  48.  
  49.   /**
  50.   @param text: plain text to scan. May be a line, paragraph (recommended)
  51.                or just a substring.<p>
  52.                Must be non-escaped, pure unicode.<p>
  53.                <em>Note:</em> ScanTXT(a, o) + ScanTXT(b, o) may be !=
  54.                Scan(a + b, o)
  55.   @param whattodo: Bitfield describing the modes of operation
  56.   @result      "<", ">" and "&" are escaped and HTML tags are inserted where
  57.                appropriate.
  58.  */
  59.   /* wstring scanTXT (in wstring text, in unsigned long whattodo); */
  60.   NS_IMETHOD ScanTXT(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) = 0;
  61.  
  62.   /**
  63.   Adds additional formatting to user edited text, that the user was too lazy
  64.   or "unknowledged" (DELETEME: is that a word?) to make.
  65.   <p>
  66.   <em>Note:</em> Don't use kGlyphSubstitution with this function. This option
  67.   generates tags, that are unuseable for UAs other than Mozilla. This would
  68.   be a data loss bug.
  69.  
  70.   @param text: HTML source to scan. May be a line, paragraph (recommended)
  71.                or just a substring.<p>
  72.                Must be correct HTML. "<", ">" and "&" must be escaped,
  73.                other chars must be pure unicode.<p>
  74.                <em>Note:</em> ScanTXT(a, o) + ScanTXT(b, o) may be !=
  75.                Scan(a + b, o)
  76.   @param whattodo: Bitfield describing the modes of operation
  77.   @result      Additional HTML tags are inserted where appropriate.
  78.  */
  79.   /* wstring scanHTML (in wstring text, in unsigned long whattodo); */
  80.   NS_IMETHOD ScanHTML(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) = 0;
  81.  
  82.   /**
  83.   @param line: line in original msg, possibly starting starting with
  84.                txt quote tags like ">"
  85.   @param logLineStart: pos in line, where the real content (logical line)
  86.                begins, i.e. pos after all txt quote tags.
  87.                E.g. position of "t" in "> > text".
  88.                Initial value must be 0, unless line is not real line.
  89.   @return      Cite Level, i.e. number of txt quote tags found, i.e. number of
  90.                nested quotes.
  91.  */
  92.   /* unsigned long citeLevelTXT (in wstring line, out unsigned long logLineStart); */
  93.   NS_IMETHOD CiteLevelTXT(const PRUnichar *line, PRUint32 *logLineStart, PRUint32 *_retval) = 0;
  94.  
  95.   /** 
  96.  @param a wide string to scan for the presence of a URL.
  97.  @param aLength --> the length of the buffer to be scanned
  98.  @param aPos --> the position in the buffer to start scanning for a url
  99.  
  100.  aStartPos --> index into the start of a url (-1 if no url found)
  101.  aEndPos --> index of the last character in the url (-1 if no url found)
  102.  */
  103.   /* void findURLInPlaintext (in wstring text, in long aLength, in long aPos, out long aStartPos, out long aEndPos); */
  104.   NS_IMETHOD FindURLInPlaintext(const PRUnichar *text, PRInt32 aLength, PRInt32 aPos, PRInt32 *aStartPos, PRInt32 *aEndPos) = 0;
  105.  
  106. };
  107.  
  108. /* Use this macro when declaring classes that implement this interface. */
  109. #define NS_DECL_MOZITXTTOHTMLCONV \
  110.   NS_IMETHOD ScanTXT(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval); \
  111.   NS_IMETHOD ScanHTML(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval); \
  112.   NS_IMETHOD CiteLevelTXT(const PRUnichar *line, PRUint32 *logLineStart, PRUint32 *_retval); \
  113.   NS_IMETHOD FindURLInPlaintext(const PRUnichar *text, PRInt32 aLength, PRInt32 aPos, PRInt32 *aStartPos, PRInt32 *aEndPos); 
  114.  
  115. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  116. #define NS_FORWARD_MOZITXTTOHTMLCONV(_to) \
  117.   NS_IMETHOD ScanTXT(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) { return _to ScanTXT(text, whattodo, _retval); } \
  118.   NS_IMETHOD ScanHTML(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) { return _to ScanHTML(text, whattodo, _retval); } \
  119.   NS_IMETHOD CiteLevelTXT(const PRUnichar *line, PRUint32 *logLineStart, PRUint32 *_retval) { return _to CiteLevelTXT(line, logLineStart, _retval); } \
  120.   NS_IMETHOD FindURLInPlaintext(const PRUnichar *text, PRInt32 aLength, PRInt32 aPos, PRInt32 *aStartPos, PRInt32 *aEndPos) { return _to FindURLInPlaintext(text, aLength, aPos, aStartPos, aEndPos); } 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  123. #define NS_FORWARD_SAFE_MOZITXTTOHTMLCONV(_to) \
  124.   NS_IMETHOD ScanTXT(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScanTXT(text, whattodo, _retval); } \
  125.   NS_IMETHOD ScanHTML(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScanHTML(text, whattodo, _retval); } \
  126.   NS_IMETHOD CiteLevelTXT(const PRUnichar *line, PRUint32 *logLineStart, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CiteLevelTXT(line, logLineStart, _retval); } \
  127.   NS_IMETHOD FindURLInPlaintext(const PRUnichar *text, PRInt32 aLength, PRInt32 aPos, PRInt32 *aStartPos, PRInt32 *aEndPos) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindURLInPlaintext(text, aLength, aPos, aStartPos, aEndPos); } 
  128.  
  129. #if 0
  130. /* Use the code below as a template for the implementation class for this interface. */
  131.  
  132. /* Header file */
  133. class _MYCLASS_ : public mozITXTToHTMLConv
  134. {
  135. public:
  136.   NS_DECL_ISUPPORTS
  137.   NS_DECL_MOZITXTTOHTMLCONV
  138.  
  139.   _MYCLASS_();
  140.  
  141. private:
  142.   ~_MYCLASS_();
  143.  
  144. protected:
  145.   /* additional members */
  146. };
  147.  
  148. /* Implementation file */
  149. NS_IMPL_ISUPPORTS1(_MYCLASS_, mozITXTToHTMLConv)
  150.  
  151. _MYCLASS_::_MYCLASS_()
  152. {
  153.   /* member initializers and constructor code */
  154. }
  155.  
  156. _MYCLASS_::~_MYCLASS_()
  157. {
  158.   /* destructor code */
  159. }
  160.  
  161. /* wstring scanTXT (in wstring text, in unsigned long whattodo); */
  162. NS_IMETHODIMP _MYCLASS_::ScanTXT(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval)
  163. {
  164.     return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166.  
  167. /* wstring scanHTML (in wstring text, in unsigned long whattodo); */
  168. NS_IMETHODIMP _MYCLASS_::ScanHTML(const PRUnichar *text, PRUint32 whattodo, PRUnichar **_retval)
  169. {
  170.     return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172.  
  173. /* unsigned long citeLevelTXT (in wstring line, out unsigned long logLineStart); */
  174. NS_IMETHODIMP _MYCLASS_::CiteLevelTXT(const PRUnichar *line, PRUint32 *logLineStart, PRUint32 *_retval)
  175. {
  176.     return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178.  
  179. /* void findURLInPlaintext (in wstring text, in long aLength, in long aPos, out long aStartPos, out long aEndPos); */
  180. NS_IMETHODIMP _MYCLASS_::FindURLInPlaintext(const PRUnichar *text, PRInt32 aLength, PRInt32 aPos, PRInt32 *aStartPos, PRInt32 *aEndPos)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* End of implementation class template. */
  186. #endif
  187.  
  188.  
  189. #endif /* __gen_mozITXTToHTMLConv_h__ */
  190.